# Contributor: Mike Crute <mike@crute.us>
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Contributor: Nulo <git@nulo.in>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=pass
pkgver=1.7.4
pkgrel=3
pkgdesc="Stores, retrieves, generates, and synchronizes passwords securely"
url="https://www.passwordstore.org"
arch="noarch"
license="GPL-2.0-or-later"
depends="bash tree cmd:gpg2"
makedepends="gnupg"
checkdepends="git"
subpackages="$pkgname-doc
	$pkgname-contrib
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="https://git.zx2c4.com/password-store/snapshot/password-store-$pkgver.tar.xz
	README.alpine
	"
builddir="$srcdir/password-store-$pkgver"

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" WITH_ALLCOMP=yes install
	install -Dm 644 "$srcdir"/README.alpine "$pkgdir"/usr/share/doc/pass/README.alpine
}

contrib() {
	pkgdesc="contrib files for pass"

	mkdir -p "$subpkgdir"/usr/bin
	mkdir -p "$subpkgdir"/usr/share
	cp -a "$builddir"/contrib "$subpkgdir"/usr/share/$pkgname
	ln -s /usr/share/$pkgname/dmenu/passmenu "$subpkgdir"/usr/bin/passmenu
}

sha512sums="
1fe108895b224451b54e545d399b6a97040e094049448509f92ae33164a5cf9044a91f52edfc705fcf333f6526df1a478deeebc4df109764d58100f9e3e22681  password-store-1.7.4.tar.xz
eca180d02af608b18a2b6d4b0eaa685c9b1bb8d2ccde921fb27cc12d6d4c31551c6b69fc2ddd2baaa840630ba3c8c0c44ee40b612e8dc004c2b90aafd299a4fa  README.alpine
"
